-
Notifications
You must be signed in to change notification settings - Fork 34
Composer integration, PSR coding standards #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,147 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use git mv
to move this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git mv
might not do what you think it does. He likely made enough changes to the file that it's no longer recognized as a rename.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evanpurkhiser Thank you)
👍 |
Please merge this! |
#!/usr/bin/env php | ||
<?php | ||
|
||
include(__DIR__ . '/../array-converter.php'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include
is a special language construct
include __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'array-converter.php';
can we have these PR pull from master to be updated? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @a-vasyliev for your contribution :-)
Please rebase from master.
@thomasbachem Is this project still maintained?
$saveFile = false; | ||
|
||
if ($argc > 3) { | ||
file_put_contents('php://stderr', 'Usage: php convert.php [-w] <file>' . "\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Usage: php array-converter.php…'
|
||
if ($isArraySyntax) { | ||
// Replace "array" and the opening bracket (including preceeding whitespace) with "[" | ||
$replacements[] = array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you could use short syntax array in this short syntax array converter? 😉
file_put_contents($filePath, $code); | ||
} else { | ||
print $code; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EOF break line missing
Hi, here is my proposal of improvement of your great work. Thank you for nice script. I've only added possibility to integrate your work into Composer to be able easily use it inside Composer-based projects. Also, I've found useful to migrate to PSR coding standards (it is used by most modern big PHP projects)